package com.xiao.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @_PackageName:com.xiao.controller
 * @_ClassName:UserController
 * @_Description:
 * @_Author：笑老二
 * @_data 2020/12/08 17:49
 */
@Controller
public class UserController {

    @RequestMapping(path = {"toMain"})
    public String toMain() {
        return "main";
    }

    @RequestMapping(path = {"/", "/index", "/toLogin"})
    public String toLogin() {
        return "login";
    }

    @RequestMapping("/level1")
    public String toLevel1(int id) {
        return "level1/level_" + id;
    }

    @RequestMapping("/level2")
    public String toLevel2(int id) {
        return "level2/level_" + id;
    }

    @RequestMapping("/level3")
    public String toLevel3(int id) {
        return "level3/level_" + id;
    }
}